<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <title></title>
  <meta name="Generator" content="Cocoa HTML Writer">
  <meta name="CocoaVersion" content="824.41">
  <style type="text/css">
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #bf0000}
    p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica; min-height: 22.0px}
    p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica}
    p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
    p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
    p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
    p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
    p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #606060}
    span.s1 {color: #0000bf}
    span.s2 {color: #000000}
    span.s3 {color: #606060}
    span.Apple-tab-span {white-space:pre}
  </style>
</head>
<body>
<p class="p1">//SLUGens released under the GNU GPL as extensions for SuperCollider 3, by Nick Collins, http://www.informatics.sussex.ac.uk/users/nc81/</p>
<p class="p2"><b></b><br></p>
<p class="p3"><b>Breakcore<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>breakcore simulator</b></p>
<p class="p2"><b></b><br></p>
<p class="p4"><b>Breakcore.ar(bufnum, capturein, capturetrigger, duration, ampdropout)</b></p>
<p class="p5"><br></p>
<p class="p4">This is noisy.</p>
<p class="p6"><br></p>
<p class="p6"><br></p>
<p class="p4">( This UGen (C and SuperCollider code) was written on Feb 7 2005 in one hour in front of a live audience as part of the TOPLAP live coding jam at transmediale, Maria am Ostbahnhof, Berlin.<span class="Apple-converted-space"> </span></p>
<p class="p4">I haven't tried to clear it up after the event, only adding this notice; make what you can of it! )</p>
<p class="p5"><br></p>
<p class="p5"><br></p>
<p class="p4">//duration in samples</p>
<p class="p5"><br></p>
<p class="p4">(60/183)*0.25*44100</p>
<p class="p5"><br></p>
<p class="p7">b = <span class="s1">Buffer</span>.alloc(s,44100);</p>
<p class="p5"><br></p>
<p class="p4">(</p>
<p class="p7">~breakfilenames= <span class="s1">Array</span>.fill(9,{<span class="s1">arg</span> i; <span class="s1">var</span> str;</p>
<p class="p8"><span class="s2">str=(</span>"sounds/SCsamp/breaks/hiphop/hop"<span class="s2">++(i+1).asString);</span></p>
<p class="p6"><br></p>
<p class="p7">if((i==3) || (i==5),{str=str++<span class="s3">".aif"</span>});</p>
<p class="p7">str</p>
<p class="p7">});</p>
<p class="p6"><br></p>
<p class="p7">~breakbeatlengths= [4,4,8,4,8,4,4,8,8];</p>
<p class="p5"><br></p>
<p class="p7">~breaks= <span class="s1">Array</span>.fill(~breakbeatlengths.size,{<span class="s1">arg</span> i; <span class="s1">Buffer</span>.read(s,~breakfilenames[i])});</p>
<p class="p4">)</p>
<p class="p5"><br></p>
<p class="p4">(</p>
<p class="p7"><span class="s1">SynthDef</span>(<span class="s3">"help-Breakcore"</span>,{ <span class="s1">arg</span> out=0, bufnum=0, target=0;</p>
<p class="p7">var playbuf;</p>
<p class="p6"><br></p>
<p class="p7">playbuf=PlayBuf.ar(1,target, loop:1);</p>
<p class="p6"><br></p>
<p class="p7"><span class="Apple-tab-span">	</span><span class="s1">Out</span>.ar(out,</p>
<p class="p7"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span> <span class="s1">Breakcore</span>.ar(bufnum, playbuf, Impulse.kr(4),5512,0)*Line.kr(1,0,10,doneAction:2)</p>
<p class="p7"><span class="Apple-tab-span">	</span>)</p>
<p class="p7">}).play(s,[\bufnum,b.bufnum,\target,~breaks[0].bufnum]);</p>
<p class="p7">)</p>
<p class="p6"><br></p>
<p class="p5"><br></p>
<p class="p4">(</p>
<p class="p7"><span class="s1">SynthDef</span>(<span class="s3">"help-Breakcore"</span>,{ <span class="s1">arg</span> out=0, bufnum;</p>
<p class="p6"><br></p>
<p class="p7"><span class="Apple-tab-span">	</span><span class="s1">Out</span>.ar(out,</p>
<p class="p7"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span> <span class="s1">Breakcore</span>.ar(bufnum, In.ar(8)*0.3, Impulse.kr(4),5512,0)*Line.kr(1,0,10,doneAction:2)</p>
<p class="p7"><span class="Apple-tab-span">	</span>)</p>
<p class="p7">}).play(s,[\bufnum,b.bufnum]);</p>
<p class="p7">)</p>
<p class="p6"><br></p>
<p class="p5"><br></p>
<p class="p4">(</p>
<p class="p7"><span class="s1">SynthDef</span>(<span class="s3">"help-Breakcore"</span>,{ <span class="s1">arg</span> out=0, bufnum=0, target=0;</p>
<p class="p7">var playbuf;</p>
<p class="p6"><br></p>
<p class="p7">playbuf=PlayBuf.ar(1,target,MouseX.kr(1,2), loop:1);</p>
<p class="p7">//AudioIn.ar(1,0.1)</p>
<p class="p7"><span class="Apple-tab-span">	</span><span class="s1">Out</span>.ar(out,</p>
<p class="p7"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span> <span class="s1">Breakcore</span>.ar(bufnum,playbuf , Impulse.kr(LFNoise0.kr(4,10,12)),LFNoise0.kr(8,1900,2000),0)<span class="Apple-tab-span">	</span>)</p>
<p class="p7">}).play(s,[\bufnum,b.bufnum, \target, ~breaks[2].bufnum]);</p>
<p class="p7">)</p>
<p class="p6"><br></p>
<p class="p6"><br></p>
<p class="p6"><br></p>
<p class="p7">(60/180)*44100*0.25</p>
<p class="p6"><br></p>
<p class="p6"><br></p>
<p class="p7">3614/4</p>
<p class="p6"><br></p>
<p class="p6"><br></p>
<p class="p6"><br></p>
</body>
</html>
